<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/common/common.css" />
		<link rel="stylesheet" href="../../css/settings/feedback.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">问题反馈</h1>
		</header>
		<div class="mui-content">
			<div class="main">
				<textarea class="text" placeholder="请文字描述出现问题，并留下联系方式" maxlength="140"></textarea>
				<div class="wordnum"><span>140</span>/140</div>
				<div class="confirm"><button type="button" class="mui-btn mui-btn-primary tijiao">提交</button></div>
			</div>
			<div class="contact">客服电话:400-800-1234</div>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/libs/zepto_1.1.3.js"></script>
		<script src="../../js/libs/vue.js"></script>
		<script src="../../js/common/common.js"></script>
		<script src="../../js/settings/feedback.js"></script>
		<script type="text/javascript">
			mui.init()
				(function() {
					var num = 140
					$(".text").on("keyup", function() {
						$(".wordnum span").text(num - $(".text").val().length)
					})
					$(".confirm").on("tap", function() {
						if($(".text").val() == "" || $(".text").val() == undefined) {
							mui.toast("信息不能为空")
							return
						}
						common.ajax("student/feedback", {
							uid: common.uid,
							token: common.token,
							content: $(".text").val()
						}, function(data) {
							if(data.code == 200) {
								mui.toast("反馈成功!");
								mui.back();
							} else {
								mui.toast(data.message)
							}
						})
					})
				})()
		</script>
	</body>

</html>